#/bin/bash
home="backend-1.0-SNAPSHOT.jar"
filename="backend"
pidlist=`ps -ef|grep java|grep $home|awk '{print $2}'`
echo "java pid is  $pidlist"
kill -9 $pidlist
sleep 1
nohup java -Xms2048m -Xmx2048m -jar -XX:+HeapDumpOnOutOfMemoryError -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:gc-$filename.log -XX:ErrorFile=$filename_OOM.log -XX:HeapDumpPath=$filename_dump.hprof  -Duser.timezone=GMT+08 $home > backend.log 2>&1 &